Machine Language for Beginners by Unknown

Machine Language for Beginners by Unknown

Author:Unknown
Language: eng
Format: epub, pdf


Building A Program 8

Program 8-3. 64 Search BASIC Loader.

799 X=PEEK(55):POKE55,X-l:REM PROTECT ML

800 FOR ADRES=40800TO40913:READ DATTA: POKE ADRES,DATTA:NEXT ADRES

900 PRINT"SYS40800 TO ACTIVATE"

4096 DATA 162, 0, 173, 1, 8, 133

4102 DATA 165, 173, 2, 8, 133, 166

4108 DATA 160, 0, 177, 165, 208, 6

4114 DATA 200, 177, 165, 208, 1, 96

4120 DATA 160, 0, 177, 165, 141, 167

4126 DATA 0, 200, 177, 165, 141, 168

4132 DATA 0, 200, 177, 165, 133, 57

4138 DATA 200, 177, 165, 133, 58, 165

4144 DATA 165, 24, 105, 4, 133, 165

4150 DATA 165, 166, 105, 0, 133, 166

4156 DATA 160, 0, 177, 165, 240, 28

4162 DATA 205, 6, 8, 240, 4, 200

4168 DATA 76, 158, 159, 162, 0, 232

4174 DATA 200, 189, 6, 8, 240, 7

4180 DATA 209, 165, 240, 245, 76, 158

4186 DATA 159, 32, 201, 159, 165, 167

4192 DATA 133, 165, 165, 168, 133, 166

4198 DATA 76, 108, 159, 32, 201, 189

4204 DATA 16.9, 32, 32, 210, 255, 96 READY.

Program 8-4. Apple Version.

700 FOR AD=768TO900: READ DA:POKE A

D,DA:NEXT AD

768 DATA169,76,141,245,3,169

774 DATA16,141,246,3,169,3

780 DATA141,247,3,96,162,0

786 DATA173,1,8,133,1,173

792 DATA2,8,133,2,160,0

798 DATA177,1,208,6,200,177

804 DATA1,208,1,96,160,0

810 DATA177,1,133,3,200,177

816 DATA1,133,4,200,177,1

822 DATA133,117,200,177,1,133

8 Building A Program

828 DATA118,165,1,24,105,4

834 DATA133,1,165,2,105,0

840 DATA133,2,160,0,177,1

846 DATA240,28,205,6,8,240

852 DATA4,200,76,76,3,162

858 DATA0,232,200,189,6,8

864 DATA240,7,209,1,240,245

870 DATA76,76,3,76,119,3

876 DATA165,3,133,1,165,4

882 DATA133,2,76,28,3,169

888 DATA163,32,237,253,32,32

894 DATA237,169,160,32,237,253

900 DATA76,108,3

Program 8-5. VIC-20 Search BASIC Loader.

800 FOR ADRES=828T0941:READ DATTA:POKE ADR

ES,DATTA:NEXT ADRES 810 PRINT"SYS 828 TO ACTIVATE" 828 DATA 162, 0, 173, 1, 16, 133 834 DATA 187, 173, 2, 16, 133, 188 840 DATA 160, 0, 177, 187, 208, 6 846 DATA 200, 177, 187, 208, 1, 96 852 DATA 160, 0, 177, 187, 141, 190 858 DATA 0, 200, 177, 187, 141, 191 864 DATA 0, 200, 177, 187, 133, 57 870 DATA 200, 177, 187, 133, 58, 165 876 DATA 187, 24, 105, 4, 133, 187 882 DATA 165, 188, 105, 0, 133, 188 888 DATA 160, 0, 177, 187, 240, 28 894 DATA 205, 6, 16, 240, 4, 200 900 DATA 76, 122, 3, 162, 0, 232 906 DATA 200, 189, 6, 16, 240, 7 912 DATA 209, 187, 240, 245, 76, 122 918 DATA 3, 32, 165, 3, 165, 190 924 DATA 133, 187, 165, 191, 133, 188 930 DATA 76, 72, 3, 32, 194, 221 936 DATA 169, 32, 32, 210, 255, 96

ML Equivalents Of BASIC Commands

What follows is a small dictionary, arranged alphabetically, of the major BASIC commands. If you need to accomplish something in ML — TAB for example — look it up in this chapter to see one way of doing it in ML. Often, because ML is so much freer than BASIC, there will be several ways to go about a given task. Of these choices, one might work faster, one might take up less memory, and one might be easier to program and understand. When faced with this choice, I have selected example routines for this chapter which are easier to program and understand. At ML speeds, and with increasingly inexpensive RAM memory available, it will be rare that you will need to opt for velocity or memory efficiency.

CLR

In BASIC, this clears all variables. Its primary effect is to reset pointers. It is a somewhat abbreviated form of NEW since it does not "blank out" your program, as NEW does.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.